package com.ydgk.dao;

import com.ydgk.bean.Kinds;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface KindsMapper {

@Insert("insert into kinds values(#{kid},#{kname},#{kface},#{style})")
int insert(Kinds kinds);

@Select("select * from kinds")
List<Kinds> findAll();

@Delete("delete from kinds where kid = #{kid}")
int deleteById(int kid);

@Select("select * from kinds where kid = #{kid}")
Kinds findById(int kid);

@Update("update kinds set kname = #{kname} , kface = #{kface} , style = #{style} where kid = #{kid}")
int updateById(Kinds kinds);
}
